package com.jintian.smart.kernel.autoconfigure;

public class ConfigConstants {
    public static final String DEFAULT_PRIMARY_DATASOURCE = "system";

    public static final String DATASOURCE_BEAN_PREFIX = "ds.";
    public static final String TRANSACTIONMANAGER_BEAN_PREFIX = "tx.";

    public static final String NACOS_DEFAULT_GROUPID = "system";
    public static final String NACOS_DEFAULT_DATAID_DATABASEPROVIDER = "db.provider";

    public static final String PROPERTIES_PREFIX_DATASOURCE = "smart.datasource";
    public static final String PROPERTIES_PREFIX_BEETLSQL = "smart.beetlsql";
    public static final String PROPERTIES_PREFIX_BEETLSQL_DEFAULT = PROPERTIES_PREFIX_BEETLSQL + ".common";
    public static final String PROPERTIES_PREFIX_DATASOURCE_DEFAULT = "smart.datasource" + ".common";

    public static String getDatasourceDataId(String dsId) {
        return DATASOURCE_BEAN_PREFIX + dsId;
    }

    public static String getDatasourceBeanName(String dsId) {
        return DATASOURCE_BEAN_PREFIX + dsId;
    }

    public static String getTransactionManagerBeanName(String dsId) {
        return TRANSACTIONMANAGER_BEAN_PREFIX + dsId;
    }
}
